#include<stdio.h>
int main()
{
	int x = 0;
	printf("请输入x:\n");
	scanf("%d",&x);
	if(x <= 0){
		printf("y = 0\n");
	}else if(x <= 10){
		printf("y = %d\n",x);
	}else if(x <= 20){
		printf("y = %d\n",10);
	}else if(x < 40){
		float f = 0.0f;
		f = -0.5*x + 20;
		printf("y = %f",f);
	}else{
		printf("game over!");
	}
	return 0;
}
